<nz-modal [(nzVisible)]="isVisible" [nzTitle]="modalTitle" [nzContent]="modalContent" [nzFooter]="modalFooter" (nzOnCancel)="handleCancel()">
  <ng-template #modalTitle>
    修改栏目组
  </ng-template>

  <ng-template #modalContent>
    <form nz-form [formGroup]="validateForm" *ngIf="active">
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>
          <span>
            栏目组名称
            <i nz-icon nz-tooltip nzTitle="请输入栏目组名称" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="name" formControlName="name" [(ngModel)]="channelGroup.name">
          <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请输入栏目组名称!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="isShow" nzRequired>导航栏是否显示</nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24" [nzValidateStatus]="validateForm.controls['isShow']">
          <nz-radio-group formControlName="isShow" [(ngModel)]="channelGroup.isShow">
            <label nz-radio-button [nzValue]=true>是</label>
            <label nz-radio-button [nzValue]=false>否</label>
          </nz-radio-group>
          <nz-form-explain *ngIf="validateForm.get('isShow').dirty && validateForm.get('isShow').errors">请选择栏目导航栏是否显示!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="orderNo" nzRequired>
          <span>
            排序
            <i nz-icon nz-tooltip nzTitle="请输入排序" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="orderNo" formControlName="orderNo" [(ngModel)]="channelGroup.orderNo">
          <nz-form-explain *ngIf="validateForm.get('orderNo').dirty && validateForm.get('orderNo').errors">请输入排序!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
    </form>
  </ng-template>

  <ng-template #modalFooter>
    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
    <button nz-button type="submit" [nzType]="'primary'" (click)="handleSave()" [nzLoading]="isConfirmLoading">保存</button>
  </ng-template>
</nz-modal>
